﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using eCRAM.Model;
using eCRAM.Dao;

namespace eCRAM.Bll
{
    public interface IUserManager //: IRepository<User>
    {
        /// <summary>
        /// Gets the user given a username/password.
        /// </summary>
        /// 
        /// <remarks>
        /// When a user/visitor logs in the eCRAM application, the visitor should match
        /// a User object.
        /// </remarks>
        /// 
        /// <param name="userName">User login</param>
        /// <param name="password">User password</param>
        /// <returns>The user or null if username/password does not match any user</returns>
        User GetUser(string userName, string password);

        User GetUser(string userName);

        bool ValidateUser(string userName, string password);
        void CreateUser(string userName, string password, string email);
        bool ChangePassword(string userName, string oldPassword, string newPassword);
    }
}
